package dev;

import jdk.internal.org.objectweb.asm.*;

import java.io.IOException;
import java.util.Arrays;

import static org.objectweb.asm.Opcodes.*;

public class EMG{

    String name;
    //正式开始测试
    public static void main(String[] args) throws InstantiationException, IllegalAccessException, IOException, NoSuchFieldException {
        json js = new json();
        ClassWriter cw = new ClassWriter(0);
        js.init(cw);
        ClassReader cr = new ClassReader("dev/obj");
        cr.accept(js,0);
        cw.visitEnd();
        byte[] b = cw.toByteArray();
        MyClassLoader my = new MyClassLoader();
        Class cls = my.defineClass("obj",b);
//        System.out.println(Arrays.toString(cls.getFields()));
//        System.out.println(cls);

        obj o = (obj)cls.newInstance();

    }

}

